<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>系统故障</title>
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link rel="stylesheet" type="text/css" href="../../easyui/themes/metro/easyui.css">
    <link rel="stylesheet" type="text/css" href="../../easyui/themes/mobile.css">
    <link rel="stylesheet" type="text/css" href="../../easyui/themes/icon.css">
    <script type="text/javascript" src="../../easyui/jquery.min.js"></script>
    <script type="text/javascript" src="../../easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../../easyui/jquery.easyui.mobile.js"></script>
    <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
    <script type="text/javascript" >
        function takePicture(){
            wx.chooseImage({
                count: 1, // 默认9
                sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图，默认二者都有
                sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机，默认二者都有
                success: function (res) {
                    var localIds = res.localIds; // 返回选定照片的本地ID列表，localId可以作为img标签的src属性显示图片
                    $('#add_image').textbox('setValue', localIds);

                    wx.uploadImage({
                        localId: localIds.toString(), // 需要上传的图片的本地ID，由chooseImage接口获得
                        isShowProgressTips: 1, // 默认为1，显示进度提示
                        success: function (res) {
                            var serverId = res.serverId; // 返回图片的服务器端ID
                            var param = {'file' : serverId}
                            alert(serverId);
                            $('#add_image').textbox('setValue', serverId);
                        }
                    });

                }
            });
        }
    </script>
</head>
<body>
<h2 align="center" style="color:#3DA0DB">意见反馈</h2>
<div>
    <form align="center" style="text-align:center;margin: 10px;">
        <div style="margin-bottom:10px">
            <input id="add_description"  style="width:100%;height:100px" class="easyui-textbox" data-options="label:'描述：',multiline:true">
        </div>

        <div style="margin-bottom:10px">
            <input id="add_image" class="easyui-textbox" label="拍照:"
                   data-options="icons: [{
                        iconCls:'icon-add',
                        handler: takePicture
                    }]"
                   style="width:100%" />
        </div>

        <div style="margin-bottom:10px">
            <a href="#"  onclick="addInfo()" class="easyui-linkbutton" plain="true" outline="true" style="width:100px;height:35px"><span style="font-size:16px">提交</span></a>
        </div>
    </form>
</div>
<script type="text/javascript" src="addInforErrorWeChat.js"></script>
</body>
</html>